diff --git a/common/cmd_bedbug.c b/common/cmd_bedbug.c
index 5b08123..9791423 100644
--- a/common/cmd_bedbug.c
+++ b/common/cmd_bedbug.c
@@ -84,7 +84,7 @@
 	len = dis_last_len;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if ((flag & CMD_FLAG_REPEAT) == 0) {
 		/* New command */
@@ -123,7 +123,7 @@
 	int rcode = 0;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	printf ("\nEnter '.' when done\n");
 	mem_addr = simple_strtoul (argv[1], NULL, 16);
diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
index 682f395..4c29fa3 100644
--- a/common/cmd_bmp.c
+++ b/common/cmd_bmp.c
@@ -102,7 +102,7 @@
 		addr = simple_strtoul(argv[1], NULL, 16);
 		break;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	return (bmp_info(addr));
@@ -126,7 +126,7 @@
 	        y = simple_strtoul(argv[3], NULL, 10);
 	        break;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	 return (bmp_display(addr, x, y));
@@ -166,7 +166,7 @@
 	if (c)
 		return  c->cmd(cmdtp, flag, argc, argv);
 	else
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_boot.c b/common/cmd_boot.c
index 0afd939..a799b33 100644
--- a/common/cmd_boot.c
+++ b/common/cmd_boot.c
@@ -43,7 +43,7 @@
 	int     rcode = 0;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	addr = simple_strtoul(argv[1], NULL, 16);
 
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 6bfef62..9304584 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -493,12 +493,12 @@
 		}
 	} else {
 		/* Unrecognized command */
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	if (images.state >= state) {
 		printf("Trying to execute a command out of order\n");
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	images.state |= state;
diff --git a/common/cmd_cache.c b/common/cmd_cache.c
index 9778d3b..8dca71f 100644
--- a/common/cmd_cache.c
+++ b/common/cmd_cache.c
@@ -54,7 +54,7 @@
 			icache_status() ? "ON" : "OFF");
 		return 0;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 	return 0;
 }
@@ -83,7 +83,7 @@
 			dcache_status() ? "ON" : "OFF");
 		return 0;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 	return 0;
 
diff --git a/common/cmd_dataflash_mmc_mux.c b/common/cmd_dataflash_mmc_mux.c
index 1678d6e..f8f1787 100644
--- a/common/cmd_dataflash_mmc_mux.c
+++ b/common/cmd_dataflash_mmc_mux.c
@@ -41,7 +41,7 @@
 			AT91F_GetMuxStatus () ? "MMC" : "SPI");
 		return 0;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 	return 0;
 }
diff --git a/common/cmd_date.c b/common/cmd_date.c
index f0fa02a..335bc05 100644
--- a/common/cmd_date.c
+++ b/common/cmd_date.c
@@ -93,8 +93,7 @@
 
 		break;
 	default:
-		cmd_usage(cmdtp);
-		rcode = 1;
+		rcode = CMD_RET_USAGE;
 	}
 
 	/* switch back to original I2C bus */
diff --git a/common/cmd_dcr.c b/common/cmd_dcr.c
index 568e226..d3bbc36 100644
--- a/common/cmd_dcr.c
+++ b/common/cmd_dcr.c
@@ -45,7 +45,7 @@
 
 	/* Validate arguments */
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Get a DCR */
 	dcrn = (unsigned short) simple_strtoul (argv[1], NULL, 16);
@@ -71,7 +71,7 @@
 
 	/* Validate arguments */
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Set a DCR */
 	dcrn = (unsigned short) simple_strtoul (argv[1], NULL, 16);
@@ -116,7 +116,7 @@
 
 	/* Validate arguments */
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Find out whether ther is '.' (dot) symbol in the first parameter. */
 	strncpy (buf, argv[1], sizeof(buf)-1);
@@ -170,7 +170,7 @@
 
 	/* Validate arguments */
 	if (argc < 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Find out whether ther is '.' (dot) symbol in the first parameter. */
 	strncpy (buf, argv[1], sizeof(buf)-1);
diff --git a/common/cmd_df.c b/common/cmd_df.c
index 9a3c84c..f7e5df3 100644
--- a/common/cmd_df.c
+++ b/common/cmd_df.c
@@ -27,7 +27,7 @@
 	}
 
 usage:
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_eeprom.c b/common/cmd_eeprom.c
index a48b3d2..4a43116 100644
--- a/common/cmd_eeprom.c
+++ b/common/cmd_eeprom.c
@@ -104,7 +104,7 @@
 		}
 	}
 
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 #endif
 
diff --git a/common/cmd_ext2.c b/common/cmd_ext2.c
index 35fb361..79b1e2f 100644
--- a/common/cmd_ext2.c
+++ b/common/cmd_ext2.c
@@ -66,7 +66,7 @@
 	int part_length;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	dev = (int)simple_strtoul (argv[2], &ep, 16);
 	dev_desc = get_dev(argv[1],dev);
@@ -163,7 +163,7 @@
 		break;
 
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	if (!filename) {
diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c
index 4fe410d..66e0ef0 100644
--- a/common/cmd_fdc.c
+++ b/common/cmd_fdc.c
@@ -744,7 +744,7 @@
 		boot_drive=simple_strtoul(argv[2], NULL, 10);
 		break;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 	/* setup FDC and scan for drives  */
 	if(fdc_setup(boot_drive,pCMD,pFG)==FALSE) {
diff --git a/common/cmd_fdos.c b/common/cmd_fdos.c
index 04a5e01..fbee861 100644
--- a/common/cmd_fdos.c
+++ b/common/cmd_fdos.c
@@ -72,7 +72,7 @@
 	name = argv [2];
 	break;
     default:
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
     }
 
     /* Init physical layer                                                   */
diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
index 9bdecca..9a5c53e 100644
--- a/common/cmd_fdt.c
+++ b/common/cmd_fdt.c
@@ -66,7 +66,7 @@
 int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 {
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Set the address of the fdt
@@ -123,7 +123,7 @@
 		int  err;
 
 		if (argc < 4)
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 		/*
 		 * Set the address and length of the fdt.
@@ -175,7 +175,7 @@
 		 * Parameters: Node path, new node to be appended to the path.
 		 */
 		if (argc < 4)
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 		pathp = argv[2];
 		nodep = argv[3];
@@ -211,7 +211,7 @@
 		 * Parameters: Node path, property, optional value.
 		 */
 		if (argc < 4)
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 		pathp  = argv[2];
 		prop   = argv[3];
@@ -409,7 +409,7 @@
 			}
 		} else {
 			/* Unrecognized command */
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 		}
 	}
 #ifdef CONFIG_OF_BOARD_SETUP
@@ -422,7 +422,7 @@
 		unsigned long initrd_start = 0, initrd_end = 0;
 
 		if ((argc != 2) && (argc != 4))
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 		if (argc == 4) {
 			initrd_start = simple_strtoul(argv[2], NULL, 16);
@@ -438,7 +438,7 @@
 	}
 	else {
 		/* Unrecognized command */
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	return 0;
diff --git a/common/cmd_fitupd.c b/common/cmd_fitupd.c
index 4d1192b..7a3789e 100644
--- a/common/cmd_fitupd.c
+++ b/common/cmd_fitupd.c
@@ -20,7 +20,7 @@
 	ulong addr = 0UL;
 
 	if (argc > 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (argc == 2)
 		addr = simple_strtoul(argv[1], NULL, 16);
diff --git a/common/cmd_flash.c b/common/cmd_flash.c
index c6ea25a..0e9b2e3 100644
--- a/common/cmd_flash.c
+++ b/common/cmd_flash.c
@@ -335,7 +335,7 @@
 	int rcode = 0;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (strcmp(argv[1], "all") == 0) {
 		for (bank=1; bank<=CONFIG_SYS_MAX_FLASH_BANKS; ++bank) {
@@ -384,7 +384,7 @@
 #endif
 
 	if (argc != 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (strcmp(argv[1], "bank") == 0) {
 		bank = simple_strtoul(argv[2], NULL, 16);
@@ -405,7 +405,7 @@
 	}
 
 	if (addr_first >= addr_last)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	rcode = flash_sect_erase(addr_first, addr_last);
 	return rcode;
@@ -475,7 +475,7 @@
 #endif
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 #if !defined(CONFIG_SYS_NO_FLASH) || defined(CONFIG_HAS_DATAFLASH)
 	if (strcmp(argv[1], "off") == 0)
@@ -483,7 +483,7 @@
 	else if (strcmp(argv[1], "on") == 0)
 		p = 1;
 	else
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 #endif
 
 #ifdef CONFIG_HAS_DATAFLASH
@@ -583,7 +583,7 @@
 #endif
 
 	if (argc != 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (strcmp(argv[2], "bank") == 0) {
 		bank = simple_strtoul(argv[3], NULL, 16);
@@ -623,7 +623,7 @@
 	}
 
 	if (addr_first >= addr_last)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	rcode = flash_sect_protect (p, addr_first, addr_last);
 #endif /* CONFIG_SYS_NO_FLASH */
diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c
index 915a5c0..1834246 100644
--- a/common/cmd_fpga.c
+++ b/common/cmd_fpga.c
@@ -255,7 +255,7 @@
 
 	switch (op) {
 	case FPGA_NONE:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	case FPGA_INFO:
 		rc = fpga_info (dev);
@@ -334,7 +334,7 @@
 
 	default:
 		printf ("Unknown operation\n");
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 	return (rc);
 }
diff --git a/common/cmd_gpio.c b/common/cmd_gpio.c
index 9cc790a..47eee89 100644
--- a/common/cmd_gpio.c
+++ b/common/cmd_gpio.c
@@ -38,7 +38,7 @@
 
 	if (argc != 3)
  show_usage:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	str_cmd = argv[1];
 	str_gpio = argv[2];
 
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index e795139..2cdc4ed 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -190,7 +190,7 @@
 	u_char  *memaddr;
 
 	if (argc != 5)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * I2C chip address
@@ -204,7 +204,7 @@
 	devaddr = simple_strtoul(argv[2], NULL, 16);
 	alen = get_alen(argv[2]);
 	if (alen > 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Length is the number of objects, not number of bytes.
@@ -242,7 +242,7 @@
 	length = i2c_dp_last_length;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if ((flag & CMD_FLAG_REPEAT) == 0) {
 		/*
@@ -261,7 +261,7 @@
 		addr = simple_strtoul(argv[2], NULL, 16);
 		alen = get_alen(argv[2]);
 		if (alen > 3)
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 		/*
 		 * If another parameter, it is the length to display.
@@ -330,7 +330,7 @@
 	int	count;
 
 	if ((argc < 4) || (argc > 5))
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Chip is always specified.
@@ -343,7 +343,7 @@
 	addr = simple_strtoul(argv[2], NULL, 16);
 	alen = get_alen(argv[2]);
 	if (alen > 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Value to write is always specified.
@@ -392,7 +392,7 @@
 	ulong	err;
 
 	if (argc < 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Chip is always specified.
@@ -405,7 +405,7 @@
 	addr = simple_strtoul(argv[2], NULL, 16);
 	alen = get_alen(argv[2]);
 	if (alen > 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Count is always specified
@@ -451,7 +451,7 @@
 	int	nbytes;
 
 	if (argc != 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 #ifdef CONFIG_BOOT_RETRY_TIME
 	reset_cmd_timeout();	/* got a good command to get here */
@@ -482,7 +482,7 @@
 		addr = simple_strtoul(argv[2], NULL, 16);
 		alen = get_alen(argv[2]);
 		if (alen > 3)
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 	}
 
 	/*
@@ -613,7 +613,7 @@
 	int	delay;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Chip is always specified.
@@ -626,7 +626,7 @@
 	addr = simple_strtoul(argv[2], NULL, 16);
 	alen = get_alen(argv[2]);
 	if (alen > 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Length is the number of objects, not number of bytes.
@@ -765,7 +765,7 @@
 	};
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Chip is always specified.
@@ -1300,7 +1300,7 @@
 	cmd_tbl_t *c;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Strip off leading 'i2c' command argument */
 	argc--;
@@ -1309,9 +1309,9 @@
 	c = find_cmd_tbl(argv[0], &cmd_i2c_sub[0], ARRAY_SIZE(cmd_i2c_sub));
 
 	if (c)
-		return  c->cmd(cmdtp, flag, argc, argv);
+		return c->cmd(cmdtp, flag, argc, argv);
 	else
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 }
 
 /***************************************************/
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index 305c602..3fb7506 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -179,7 +179,7 @@
 	switch (argc) {
 	case 0:
 	case 1:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	case 2:
 		if (strncmp(argv[1], "res", 3) == 0) {
 			puts("\nReset IDE"
@@ -232,7 +232,7 @@
 			}
 			return rcode;
 		}
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	case 3:
 		if (strncmp(argv[1], "dev", 3) == 0) {
 			int dev = (int) simple_strtoul(argv[2], NULL, 10);
@@ -266,7 +266,7 @@
 			return rcode;
 		}
 
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	default:
 		/* at least 4 args */
 
@@ -325,7 +325,7 @@
 			else
 				return 1;
 		} else {
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 		}
 
 		return rcode;
@@ -361,7 +361,7 @@
 		break;
 	default:
 		show_boot_progress(-42);
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 	show_boot_progress(42);
 
diff --git a/common/cmd_irq.c b/common/cmd_irq.c
index d35a43f..9f158ef 100644
--- a/common/cmd_irq.c
+++ b/common/cmd_irq.c
@@ -28,7 +28,7 @@
 {
 
 	if (argc != 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* on */
 	if (strncmp(argv[1], "on", 2) == 0)
diff --git a/common/cmd_itest.c b/common/cmd_itest.c
index 2a238a4..d5df758 100644
--- a/common/cmd_itest.c
+++ b/common/cmd_itest.c
@@ -161,7 +161,7 @@
 
 	/* Validate arguments */
 	if ((argc != 4))
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Check for a data width specification.
 	 * Defaults to long (4) if no specification.
diff --git a/common/cmd_led.c b/common/cmd_led.c
index f55f94c..d83b3ba 100644
--- a/common/cmd_led.c
+++ b/common/cmd_led.c
@@ -93,12 +93,12 @@
 
 	/* Validate arguments */
 	if ((argc != 3)) {
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	cmd = get_led_cmd(argv[2]);
 	if (cmd < 0) {
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	for (i = 0; led_commands[i].string; i++) {
@@ -132,7 +132,7 @@
 
 	/* If we ran out of matches, print Usage */
 	if (!match) {
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	return 0;
diff --git a/common/cmd_load.c b/common/cmd_load.c
index dad0303..f4d66de 100644
--- a/common/cmd_load.c
+++ b/common/cmd_load.c
@@ -1102,7 +1102,7 @@
 			if (strcmp(argv[1], "on") == 0)
 				hwflow_onoff(1);
 			else
-				return cmd_usage(cmdtp);
+				return CMD_RET_USAGE;
 	}
 	printf("RTS/CTS hardware flow control: %s\n", hwflow_onoff(0) ? "on" : "off");
 	return 0;
diff --git a/common/cmd_log.c b/common/cmd_log.c
index 249614f..f9fbe00 100644
--- a/common/cmd_log.c
+++ b/common/cmd_log.c
@@ -241,10 +241,10 @@
 			}
 			return 0;
 		}
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 }
 
diff --git a/common/cmd_md5sum.c b/common/cmd_md5sum.c
index 629a74d..b93dd9b 100644
--- a/common/cmd_md5sum.c
+++ b/common/cmd_md5sum.c
@@ -32,7 +32,7 @@
 	u8 output[16];
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	addr = simple_strtoul(argv[1], NULL, 16);
 	len = simple_strtoul(argv[2], NULL, 16);
diff --git a/common/cmd_mdio.c b/common/cmd_mdio.c
index 4ac9de4..77d8df1 100644
--- a/common/cmd_mdio.c
+++ b/common/cmd_mdio.c
@@ -193,7 +193,7 @@
 	struct mii_dev *bus;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * We use the last specified parameters, unless new ones are
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index f7e76d6..fa6f599 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -74,7 +74,7 @@
 	length = dp_last_length;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if ((flag & CMD_FLAG_REPEAT) == 0) {
 		/* New command specified.  Check for a size specification.
@@ -168,7 +168,7 @@
 	int	size;
 
 	if ((argc < 3) || (argc > 4))
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Check for size specification.
 	*/
@@ -210,7 +210,7 @@
 	ulong count;
 
 	if (argc < 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	count = simple_strtoul(argv[3], NULL, 10);
 
@@ -237,7 +237,7 @@
 	ulong count;
 
 	if (argc < 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	count = simple_strtoul(argv[3], NULL, 10);
 
@@ -266,7 +266,7 @@
 	int     rcode = 0;
 
 	if (argc != 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Check for size specification.
 	*/
@@ -352,7 +352,7 @@
 	int	size;
 
 	if (argc != 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Check for size specification.
 	*/
@@ -478,7 +478,7 @@
 	volatile u_char	*cp;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Check for a size spefication.
 	 * Defaults to long if no or incorrect specification.
@@ -547,7 +547,7 @@
 	volatile u_char	*cp;
 
 	if (argc < 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Check for a size spefication.
 	 * Defaults to long if no or incorrect specification.
@@ -979,7 +979,7 @@
 	int	nbytes, size;
 
 	if (argc != 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 #ifdef CONFIG_BOOT_RETRY_TIME
 	reset_cmd_timeout();	/* got a good command to get here */
@@ -1084,7 +1084,7 @@
 	ulong *ptr;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	addr = simple_strtoul (argv[1], NULL, 16);
 	addr += base_address;
@@ -1118,7 +1118,7 @@
 
 	if (argc < 3) {
 usage:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	av = argv + 1;
diff --git a/common/cmd_mfsl.c b/common/cmd_mfsl.c
index 00180b0..ddf80d7 100644
--- a/common/cmd_mfsl.c
+++ b/common/cmd_mfsl.c
@@ -38,13 +38,13 @@
 	unsigned int blocking;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	fslnum = (unsigned int)simple_strtoul (argv[1], NULL, 16);
 	blocking = (unsigned int)simple_strtoul (argv[2], NULL, 16);
 	if (fslnum < 0 || fslnum >= XILINX_FSL_NUMBER) {
 		puts ("Bad number of FSL\n");
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	switch (fslnum) {
@@ -193,13 +193,13 @@
 	unsigned int blocking;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	fslnum = (unsigned int)simple_strtoul (argv[1], NULL, 16);
 	num = (unsigned int)simple_strtoul (argv[2], NULL, 16);
 	blocking = (unsigned int)simple_strtoul (argv[3], NULL, 16);
 	if (fslnum < 0 || fslnum >= XILINX_FSL_NUMBER)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	switch (fslnum) {
 #if (XILINX_FSL_NUMBER > 0)
@@ -347,7 +347,7 @@
 	unsigned int val = 0;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	reg = (unsigned int)simple_strtoul (argv[1], NULL, 16);
 	val = (unsigned int)simple_strtoul (argv[2], NULL, 16);
diff --git a/common/cmd_mgdisk.c b/common/cmd_mgdisk.c
index d99af2d..3bd2429 100644
--- a/common/cmd_mgdisk.c
+++ b/common/cmd_mgdisk.c
@@ -54,7 +54,7 @@
 			return 1;
 		break;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 	return 0;
 }
diff --git a/common/cmd_mii.c b/common/cmd_mii.c
index 23b723e..8df44cc 100644
--- a/common/cmd_mii.c
+++ b/common/cmd_mii.c
@@ -293,7 +293,7 @@
 	const char	*devname;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 #if defined(CONFIG_MII_INIT)
 	mii_init ();
@@ -420,7 +420,7 @@
 		else
 			miiphy_set_current_dev (argv[2]);
 	} else {
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	/*
diff --git a/common/cmd_misc.c b/common/cmd_misc.c
index 061b1bb..973b1c2 100644
--- a/common/cmd_misc.c
+++ b/common/cmd_misc.c
@@ -33,7 +33,7 @@
 	ulong delay;
 
 	if (argc != 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	delay = simple_strtoul(argv[1], NULL, 10) * CONFIG_SYS_HZ;
 
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 8f13c22..750509d 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -32,7 +32,7 @@
 	int dev;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (strcmp(argv[1], "init") == 0) {
 		if (argc == 2) {
@@ -43,7 +43,7 @@
 		} else if (argc == 3) {
 			dev = (int)simple_strtoul(argv[2], NULL, 10);
 		} else {
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 		}
 
 		if (mmc_legacy_init(dev) != 0) {
@@ -68,12 +68,12 @@
 #endif
 			curr_device = dev;
 		} else {
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 		}
 
 		printf("mmc%d is current device\n", curr_device);
 	} else {
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	return 0;
@@ -153,7 +153,7 @@
 	enum mmc_state state;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (curr_device < 0) {
 		if (get_mmc_num() > 0)
@@ -216,7 +216,7 @@
 				return 1;
 			}
 		} else
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 		mmc = find_mmc_device(dev);
 		if (!mmc) {
@@ -307,7 +307,7 @@
 		return (n == cnt) ? 0 : 1;
 	}
 
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_mmc_spi.c b/common/cmd_mmc_spi.c
index cfd0fb1..98cd788 100644
--- a/common/cmd_mmc_spi.c
+++ b/common/cmd_mmc_spi.c
@@ -78,8 +78,7 @@
 	return 0;
 
 usage:
-	cmd_usage(cmdtp);
-	return 1;
+	return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_mp.c b/common/cmd_mp.c
index b115b59..4b27be4 100644
--- a/common/cmd_mp.c
+++ b/common/cmd_mp.c
@@ -29,7 +29,7 @@
 	unsigned long cpuid;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	cpuid = simple_strtoul(argv[1], NULL, 10);
 	if (!is_core_valid(cpuid)) {
@@ -46,17 +46,17 @@
 		else if (strncmp(argv[2], "disable", 7) == 0)
 			return cpu_disable(cpuid);
 		else
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 		return 0;
 	}
 
 	/* 4 or greater, make sure its release */
 	if (strncmp(argv[2], "release", 7) != 0)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (cpu_release(cpuid, argc - 3, argv + 3))
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	return 0;
 }
diff --git a/common/cmd_mtdparts.c b/common/cmd_mtdparts.c
index b7c833b..2268829 100644
--- a/common/cmd_mtdparts.c
+++ b/common/cmd_mtdparts.c
@@ -2035,7 +2035,7 @@
 		return spread_partitions();
 #endif /* CONFIG_CMD_MTDPARTS_SPREAD */
 
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 /***************************************************/
diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index fa96a52..035a6f6 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -358,7 +358,7 @@
 	return ret;
 
 usage:
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 #endif
@@ -720,7 +720,7 @@
 #endif
 
 usage:
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
@@ -909,7 +909,7 @@
 usage:
 #endif
 		show_boot_progress(-53);
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	show_boot_progress(53);
diff --git a/common/cmd_net.c b/common/cmd_net.c
index 89519fa..3dd6810 100644
--- a/common/cmd_net.c
+++ b/common/cmd_net.c
@@ -231,7 +231,7 @@
 #endif
 	default:
 		show_boot_progress (-80);
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	show_boot_progress (80);
@@ -271,7 +271,7 @@
 
 	NetPingIP = string_to_ip(argv[1]);
 	if (NetPingIP == 0)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (NetLoop(PING) < 0) {
 		printf("ping failed; host %s is not alive\n", argv[1]);
@@ -377,7 +377,7 @@
 int do_dns(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	if (argc == 1)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * We should check for a valid hostname:
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 20080dc..22f9821 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -173,7 +173,7 @@
 	int rcode = 1, arg = 1, idx;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	memset(matched, 0, env_htab.size / 8);
 
@@ -411,7 +411,7 @@
 int do_env_set(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	return _do_env_set(flag, argc, argv);
 }
@@ -435,7 +435,7 @@
 	/* Check the syntax */
 	switch (argc) {
 	case 1:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	case 2:		/* env_ask envname */
 		sprintf(message, "Please enter '%s':", argv[1]);
@@ -493,7 +493,7 @@
 	char *init_val;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Set read buffer to initial value or empty sting */
 	init_val = getenv(argv[1]);
@@ -631,7 +631,7 @@
 			  int argc, char * const argv[])
 {
 	if (argc != 2 || strcmp(argv[1], "-f") != 0)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	set_default_env("## Resetting to default environment\n");
 	return 0;
@@ -730,14 +730,14 @@
 				sep = '\n';
 				break;
 			default:
-				return cmd_usage(cmdtp);
+				return CMD_RET_USAGE;
 			}
 		}
 NXTARG:		;
 	}
 
 	if (argc < 1)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	addr = (char *)simple_strtoul(argv[0], NULL, 16);
 
@@ -838,13 +838,13 @@
 				del = 1;
 				break;
 			default:
-				return cmd_usage(cmdtp);
+				return CMD_RET_USAGE;
 			}
 		}
 	}
 
 	if (argc < 1)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (!fmt)
 		printf("## Warning: defaulting to text format\n");
@@ -944,7 +944,7 @@
 	cmd_tbl_t *cp;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* drop initial "env" arg */
 	argc--;
@@ -955,7 +955,7 @@
 	if (cp)
 		return cp->cmd(cmdtp, flag, argc, argv);
 
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c
index a27adaa..0f2e208 100644
--- a/common/cmd_onenand.c
+++ b/common/cmd_onenand.c
@@ -390,7 +390,7 @@
 	size_t retlen = 0;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	s = strchr(argv[0], '.');
 	if ((s != NULL) && (!strcmp(s, ".oob")))
@@ -417,7 +417,7 @@
 	size_t retlen = 0;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (strncmp(argv[0] + 6, "yaffs", 5) == 0)
 		withoob = 1;
@@ -503,7 +503,7 @@
 	char *s;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	s = strchr(argv[0], '.');
 	ofs = (int)simple_strtoul(argv[1], NULL, 16);
@@ -525,7 +525,7 @@
 	argv += 2;
 
 	if (argc <= 0)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	while (argc > 0) {
 		addr = simple_strtoul(*argv, NULL, 16);
@@ -569,7 +569,7 @@
 	cmd_tbl_t *c;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	mtd = &onenand_mtd;
 
@@ -582,7 +582,7 @@
 	if (c)
 		return c->cmd(cmdtp, flag, argc, argv);
 	else
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_otp.c b/common/cmd_otp.c
index eb93eb2..6f93335 100644
--- a/common/cmd_otp.c
+++ b/common/cmd_otp.c
@@ -89,7 +89,7 @@
 
 	if (argc < 4) {
  usage:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	prompt_user = false;
diff --git a/common/cmd_pci.c b/common/cmd_pci.c
index 1e477bc..a1fe519 100644
--- a/common/cmd_pci.c
+++ b/common/cmd_pci.c
@@ -480,7 +480,7 @@
 
 	return 1;
  usage:
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 /***************************************************/
diff --git a/common/cmd_portio.c b/common/cmd_portio.c
index 4f2f499..eae8f07 100644
--- a/common/cmd_portio.c
+++ b/common/cmd_portio.c
@@ -44,7 +44,7 @@
 	uint value = out_last_value;
 
 	if (argc != 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if ((flag & CMD_FLAG_REPEAT) == 0) {
 		/*
@@ -102,7 +102,7 @@
 	uint size = in_last_size;
 
 	if (argc != 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if ((flag & CMD_FLAG_REPEAT) == 0) {
 		/*
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 3f69643..8a68fa1 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -322,7 +322,7 @@
 	int err;
 
 	if (argc != 1)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 
 	pxefile_addr_str = from_env("pxefile_addr_r");
@@ -1312,7 +1312,7 @@
 	} else if (argc == 2) {
 		pxefile_addr_str = argv[1];
 	} else {
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	if (strict_strtoul(pxefile_addr_str, 16, &pxefile_addr_r) < 0) {
@@ -1344,7 +1344,7 @@
 	cmd_tbl_t *cp;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* drop initial "pxe" arg */
 	argc--;
@@ -1355,7 +1355,7 @@
 	if (cp)
 		return cp->cmd(cmdtp, flag, argc, argv);
 
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_reiser.c b/common/cmd_reiser.c
index ced1d40..fbb9484 100644
--- a/common/cmd_reiser.c
+++ b/common/cmd_reiser.c
@@ -57,7 +57,7 @@
 	int part_length;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	dev = (int)simple_strtoul (argv[2], &ep, 16);
 	dev_desc = get_dev(argv[1],dev);
@@ -149,7 +149,7 @@
 		break;
 
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	if (!filename) {
diff --git a/common/cmd_sata.c b/common/cmd_sata.c
index f62c0cb..7b1703f 100644
--- a/common/cmd_sata.c
+++ b/common/cmd_sata.c
@@ -79,7 +79,7 @@
 	switch (argc) {
 	case 0:
 	case 1:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	case 2:
 		if (strncmp(argv[1],"inf", 3) == 0) {
 			int i;
@@ -116,7 +116,7 @@
 			}
 			return rc;
 		}
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	case 3:
 		if (strncmp(argv[1], "dev", 3) == 0) {
 			int dev = (int)simple_strtoul(argv[2], NULL, 10);
@@ -147,7 +147,7 @@
 			}
 			return rc;
 		}
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	default: /* at least 4 args */
 		if (strcmp(argv[1], "read") == 0) {
@@ -183,7 +183,7 @@
 				n, (n == cnt) ? "OK" : "ERROR");
 			return (n == cnt) ? 0 : 1;
 		} else {
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 		}
 
 		return rc;
diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c
index fa10751..d15b567 100644
--- a/common/cmd_scsi.c
+++ b/common/cmd_scsi.c
@@ -230,7 +230,7 @@
 		boot_device = argv[2];
 		break;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	if (!boot_device) {
@@ -336,10 +336,11 @@
 int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	switch (argc) {
-    case 0:
-    case 1:	return cmd_usage(cmdtp);
+	case 0:
+	case 1:
+		return CMD_RET_USAGE;
 
-    case 2:
+	case 2:
 			if (strncmp(argv[1],"res",3) == 0) {
 				printf("\nReset SCSI\n");
 				scsi_bus_reset();
@@ -384,7 +385,7 @@
 					printf("\nno SCSI devices available\n");
 				return 1;
 			}
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 	case 3:
 			if (strncmp(argv[1],"dev",3) == 0) {
 				int dev = (int)simple_strtoul(argv[2], NULL, 10);
@@ -412,7 +413,7 @@
 				}
 				return 1;
 			}
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
     default:
 			/* at least 4 args */
 			if (strcmp(argv[1],"read") == 0) {
@@ -427,7 +428,7 @@
 				return 0;
 			}
 	} /* switch */
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 /****************************************************************************************
diff --git a/common/cmd_setexpr.c b/common/cmd_setexpr.c
index 1ff1232..1b3edb7 100644
--- a/common/cmd_setexpr.c
+++ b/common/cmd_setexpr.c
@@ -58,7 +58,7 @@
 
 	/* Validate arguments */
 	if ((argc != 5) || (strlen(argv[3]) != 1))
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	w = cmd_get_data_size(argv[0], 4);
 
diff --git a/common/cmd_sf.c b/common/cmd_sf.c
index 98e4162..9c76464 100644
--- a/common/cmd_sf.c
+++ b/common/cmd_sf.c
@@ -298,7 +298,7 @@
 		return ret;
 
 usage:
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_sha1sum.c b/common/cmd_sha1sum.c
index 2b2dd8b..2713a14 100644
--- a/common/cmd_sha1sum.c
+++ b/common/cmd_sha1sum.c
@@ -32,7 +32,7 @@
 	u8 output[20];
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	addr = simple_strtoul(argv[1], NULL, 16);
 	len = simple_strtoul(argv[2], NULL, 16);
diff --git a/common/cmd_strings.c b/common/cmd_strings.c
index 2986324..41b1665 100644
--- a/common/cmd_strings.c
+++ b/common/cmd_strings.c
@@ -15,7 +15,7 @@
 int do_strings(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	if (argc == 1)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if ((flag & CMD_FLAG_REPEAT) == 0) {
 		start_addr = (char *)simple_strtoul(argv[1], NULL, 16);
diff --git a/common/cmd_time.c b/common/cmd_time.c
index c937ae4..6dbdbbf 100644
--- a/common/cmd_time.c
+++ b/common/cmd_time.c
@@ -38,7 +38,7 @@
 		return 1;
 	}
 	if (argc > cmdtp->maxargs)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * TODO(clchiou): get_timer_masked() is only defined in certain ARM
@@ -77,7 +77,7 @@
 	int retval = 0;
 
 	if (argc == 1)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	retval = run_command_and_time_it(0, argc - 1, argv + 1, &cycles);
 	report_time(cycles);
diff --git a/common/cmd_ubi.c b/common/cmd_ubi.c
index 8c1bc23..35b1d31 100644
--- a/common/cmd_ubi.c
+++ b/common/cmd_ubi.c
@@ -438,7 +438,7 @@
 	int err = 0;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (mtdparts_init() != 0) {
 		printf("Error initializing mtdparts!\n");
@@ -465,7 +465,7 @@
 		}
 
 		if (argc < 3)
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 #ifdef CONFIG_CMD_UBIFS
 		/*
diff --git a/common/cmd_ubifs.c b/common/cmd_ubifs.c
index 3cd2d8f..7752123 100644
--- a/common/cmd_ubifs.c
+++ b/common/cmd_ubifs.c
@@ -53,7 +53,7 @@
 	int ret;
 
 	if (argc != 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	vol_name = argv[1];
 	debug("Using volume %s\n", vol_name);
@@ -94,7 +94,7 @@
 int do_ubifs_umount(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	if (argc != 1)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (ubifs_initialized == 0) {
 		printf("No UBIFS volume mounted!\n");
@@ -141,18 +141,18 @@
 	}
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	addr = simple_strtoul(argv[1], &endp, 16);
 	if (endp == argv[1])
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	filename = argv[2];
 
 	if (argc == 4) {
 		size = simple_strtoul(argv[3], &endp, 16);
 		if (endp == argv[3])
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 	}
 	debug("Loading file '%s' to address 0x%08x (size %d)\n", filename, addr, size);
 
diff --git a/common/cmd_unzip.c b/common/cmd_unzip.c
index 6483b92..43ed791 100644
--- a/common/cmd_unzip.c
+++ b/common/cmd_unzip.c
@@ -39,7 +39,7 @@
 			dst = simple_strtoul(argv[2], NULL, 16);
 			break;
 		default:
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 	}
 
 	if (gunzip((void *) dst, dst_len, (void *) src, &src_len) != 0)
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index 320667f..4a86590 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -379,7 +379,7 @@
 		boot_device = argv[2];
 		break;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	if (!boot_device) {
@@ -509,7 +509,7 @@
 #endif
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if ((strncmp(argv[1], "reset", 5) == 0) ||
 		 (strncmp(argv[1], "start", 5) == 0)) {
@@ -694,7 +694,7 @@
 		return 0;
 	}
 #endif /* CONFIG_USB_STORAGE */
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 #ifdef CONFIG_USB_STORAGE
diff --git a/common/main.c b/common/main.c
index 4adc17a..db181d3 100644
--- a/common/main.c
+++ b/common/main.c
@@ -1381,7 +1381,7 @@
 	int i;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	for (i=1; i<argc; ++i) {
 		char *arg;
